#include "roller.h"
#include "../Commands/RollerJoy.h"
#include "../CommandBase.h"

Roller::Roller() : Subsystem("roller")
{	
	rollerJaguar = new CANJaguar(ROLLER_JAGUAR, CANJaguar::kVoltage);
}

void Roller::rollerJoystick(Joystick *joystick)
{
	if(joystick->GetRawButton(BUTTON_F))
		rollerJaguar->Set(99);
	else if(joystick->GetRawButton(BUTTON_S))
		rollerJaguar->Set(0);
	else if (joystick->GetRawButton(BUTTON_R))
		rollerJaguar->Set(-99);
			
}

void Roller::InitDefaultCommand()
{
	SetDefaultCommand(new RollerJoy());
}
